package com.hymall.bean;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

@Data
public class MarketCart {
    private Integer id;

    private Integer userId;

    private Integer goodsId;

    private String goodsSn;

    private String goodsName;

    private Integer productId;

    private BigDecimal price;

    private Short number;
    //修改使用typehandler
    private String[] specifications = new String[0];

    private Boolean checked;

    private String picUrl;

    private Date addTime;

    private Date updateTime;

    private Boolean deleted;

    public String getSpecificationsList() {
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append("[\"");
        for (String s : specifications) {
            stringBuffer.append(s);
        }
        stringBuffer.append("\"]");
        return stringBuffer.toString();
    }
}